class CommentsController < ApplicationController

  def index
    
  end

  def create
    @comment = Log.new
    @issue = Issue.find(params[:issue_id])
    @comment = @issue.logs.build(params[:comment])
    @comment.user_id = current_user.id
    @comment.log_type = "user"
    @comment.save unless @comment.content.empty?
    redirect_to @issue
  end

end
